<template>
  <el-row :gutter="10" class="top-view">
    <el-col :span="6"><TodaySales /></el-col>
    <el-col :span="6"><TodayOrder /></el-col>
    <el-col :span="6"><TodayUsers /></el-col>
    <el-col :span="6"><TotalUsers /></el-col>
  </el-row>
</template>
<script setup lang="ts">
import TodaySales from "./TodaySales";
import TodayOrder from "./TodayOrder";
import TodayUsers from "./TodayUsers";
import TotalUsers from "./TotalUsers";
</script>
<script lang="ts">
export default {
  name: "TopView",
};
</script>

<style lang="scss">
/* 分析为什么这几个class需要设置为公共样式类，是因为每个卡片中都有emphasis，而今日销售额和累计用户数卡片中有递增递减的样式控制 */
.top-view {
  margin-top: 50px;
  .compare,
  .common-card .bottom {
    color: white;
    font-weight: 800;
  }
  .emphasis {
    margin: 0 5px;
    font-size: 12px;
    font-weight: 700;
  }
  .increment {
    width: 0;
    height: 0;
    border-width: 4px;
    border-color: transparent transparent green transparent;
    border-style: solid;
  }
  .decrement {
    width: 0;
    height: 0;
    border-width: 4px;
    border-color: red transparent transparent transparent;
    border-style: solid;
  }
}
</style>
